﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KnowledgeAssistant
{
    public class Group
    {
        private int group_id;
        private string name;
        private string group_number;
        private byte course;

        public Group(int group_id, string name, string group_number, byte course)
        {
            this.group_id = group_id;
            this.name = name;
            this.group_number = group_number;
            this.course = course;
        }

        public int GroupID
        {
            get { return this.group_id; }
            set { this.group_id = value; }
        }

        public string GroupNumber
        {
            get { return this.group_number; }
            set { this.group_number = value; }
        }

        public string GroupName
        {
            get { return this.name; }
            set { this.name = value; }
        }

        public byte Course
        {
            get { return this.course; }
            set { this.course = value; }
        }

        public string FullName
        {            
            get 
            { 
                bool isnullname = (GroupName == null || GroupName == "")?true:false;
                bool isnullnumber = (GroupNumber == null || GroupNumber == "") ? true : false;
                string fullname =
                     (isnullnumber ? "" : GroupNumber) + (isnullnumber ? GroupName : ", " + GroupName);
                return fullname; 
            }
        }

    }
}
